This notebook covers the first interactive session

Dataset 2: DARPA Sheaf Tutorial Original source: Michael Robinson, American University michaelr@american.edu, collected using a modified version of software originally written by Daniel Muellner and Mikael Vejdemo-Johansson. Preparer: Michael Robinson, American University michaelr@american.edu Collection date: July 2011 Copyright 2015: The data in this directory were prepared for use at the DARPA Tutorial on Sheaves in Data Analytics, August 25-26, 2015. Permission is granted for the use of the data in that context alone; all other rights are reserved. Any further dissemination requires permission of the original source.

Principal components analysis of wifi data

Copyright (c) 2015, Michael Robinson Distribution of unaltered copies permitted for noncommercial use only All other uses require express permission of the author This software comes with no warrantees express or implied

https://www.youtube.com/watch?v=b1Wu8kTngoE


In [1]:
import numpy as np
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt

In [2]:
# Ingest data
pts=[]
with open('loop2.csv','rt') as f1:
    f1.readline() # Skip header
    for line in f1:
        pts.append(np.array(map(float,line.split(','))))

In [3]:
# Run PCA for visualization
ptsmat=np.array(pts).T
u,s,v=np.linalg.svd(np.dot(ptsmat,ptsmat.T))
locations=np.dot(v[0:3,:],ptsmat).T

In [4]:
# Plot the result
fig=plt.figure()
ax=Axes3D(fig)
ax.hold(True)
ax.scatter(locations[:,0],locations[:,1],locations[:,2])
plt.show()

In [ ]: